package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class SearchWord implements Serializable {

    private static final long serialVersionUID = -2526799175880906902L;
    //fields
    private java.lang.Long id;
    private java.lang.String word;
    private java.sql.Timestamp createTime;

    //default constructor
    public SearchWord() {
    }

    //getter
    public java.lang.Long getId() {
        return id;
    }

    public java.lang.String getWord() {
        return word;
    }

    public java.sql.Timestamp getCreateTime() {
        return createTime;
    }

    //setter
    public void setId(java.lang.Long id) {
        this.id = id;
    }

    public void setWord(java.lang.String word) {
        this.word = word;
    }

    public void setCreateTime(java.sql.Timestamp createTime) {
        this.createTime = createTime;
    }

    //equals method
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof SearchWord)) {
            return false;
        }

        final SearchWord searchWord = (SearchWord) other;
        if (!this.id.equals(searchWord.getId())) {
            return false;
        }

        return true;
    }

    //hashCode method
    public int hashCode() {
        StringBuffer keys = new StringBuffer();
        keys.append(id).append(",");
        if (keys.length() > 0) {
            keys.deleteCharAt(keys.length() - 1);
        }
        return keys.toString().hashCode();
    }

    //toString method
    public String toString() {
        return new StringBuilder("SearchWord[").append("id=").append(id).append(", ").append("word=").append(word).append(", ").append("createTime=").append(createTime).append("]").toString();
    }
}